home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
self
/
contrib.lha
/
contrib
/
SelfNews
/
tEdit.self
< prev
next >
Wrap
Text File
|
1993-07-24
|
1KB
|
57 lines
"File tEdit.self
created by Ian Wilkinson on Mon Oct 12 17:52:40 1992
Copyright (c) Canon Research Centre Europe, 1992.
All rights reserved."
traits applications visualiser _AddSlotsIfAbsent: ( | ^ tEdit = () | )
traits tEdit _Define: ( |
_ parent* = traits clonable.
^ fashion = ( copy initialize ).
^ initialize = (
jotW: wireI open loadPackages.
jotI initialize: jotW.
textHolder: jotText newText: initialSz.
formatter: jotView newViewFor: textHolder On: jotW.
ruler: jotRuler newRuler.
ruler initialiseFontFor: textHolder In: formatter.
self
).
^ setReadOnly: isProtected = ( formatter setReadOnly: isProtected ).
^ placeAtEnd: text = ( textHolder placeAtEnd: text ).
^ synthesizeWithoutInteraction = (
visualisation: fabricateTEdit on: formatter canvas Media: jotW.
formatter behaviour do: [ | :aspect |
visualisation behaviourFor: self On: aspect Is: 'formatterCalling'.
].
visualisation construction
).
^ contents = ( | s |
s: mutableString copySize: textHolder size + 1 FillingWith: ' '.
textHolder contentsInto: s.
s
).
^ formatterCalling = ( formatter respond )
| )
prototypes visualiser _AddSlotsIfAbsent: ( | ^ tEdit = () | )
tEdit _Define: ( |
_ parent* = traits tEdit.
_ thisObjectPrints = true.
^ visualisation <- fabricateTEdit.
^ jotW.
^ textHolder.
^ formatter.
^ ruler.
_ initialSz = 1024.
^ printString = 'a tEdit'
| )